package com.superbytecode.stencil.controller;

import com.superbytecode.stencil.service.DatasourceService;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * All rights Reserved, Designed By www.super-master.com
 *
 * @ProjectName: code-stencil
 * @Package: com.superbytecode.stencil.controller
 * @ClassName: GenDatabaseController
 * @Description: []
 * <p> </p>
 * @Author: [Lance Ting]
 * @Date: 2024/10/11 18:01
 * @Version: V1.0
 * @Copyright: 2024 www.super-master.cn Inc. All rights reserved.
 * TODO: 注意,本文件Lance Ting所作,如果转载或使用请标明具体出处!
 **/
@RestController
@RequestMapping("/datasource")
public class GenDatabaseController {
    @Resource
    private DatasourceService datasourceService;

    /**
     * 代码生成
     **/
    @RequestMapping("/query/{datasourceId}")
    public Object queryDatasourceById(@PathVariable Long datasourceId) {
        return datasourceService.obtainDatasource(datasourceId);
    }
}